import { IsNotEmpty, MaxLength, Min } from 'class-validator'
import { Menu } from 'src/modules/menu/entities/menu.entity'
import { Permission } from 'src/modules/permission/entities/permission.entity'

export class CreateRoleDto {
  @IsNotEmpty({
    message: '角色名称不能为空',
  })
  @MaxLength(20, {
    message: '角色名称最长为 20 字符',
  })
  name: string

  @MaxLength(100, {
    message: '角色名称的描述最长为 100 字符',
  })
  description: string

  menu: Menu[]

  permissions: Permission[]
}
